import request from '@/utils/request'
import {commercialApiUrl} from '../config'

// 分包预算转总价审批


/**
 * 分页查询
 * @param {Object} data
 */
export function getBudgetList(data) {
    return request({
        url: `${commercialApiUrl}/business-subcontracting-budget/list`,
        method: 'post',
        data: data
    })
}
/**
 * 新增或修改
 * @param {Object} data
 */
export function updateBudget(data) {
    return request({
        url: `${commercialApiUrl}/business-subcontracting-budget/addOrUpdate`,
        method: 'post',
        data: data
    })
}

/**
 * 删除/撤销/作废 总包计量-设计变更
 * @param {Object} data
 */
export function delBudget(data) {
    return request({
        url: `${commercialApiUrl}/business-subcontracting-budget/delData?id=${data.id}&type=${data.type}`,
        method: 'get',
    })
}

/**
 *详情
 * @param {Object} data
 */
export function getBudgetDetail(data) {
    return request({
        url: `${commercialApiUrl}/business-subcontracting-budget/detail?id=${data.id}`,
        method: 'get',
    })
}

/**
 *统计
 * @param {Object} data
 */
export function getCountBudget(data) {
    return request({
        url: `${commercialApiUrl}/business-subcontracting-budget/getCount`,
        method: 'post',
        data: data
    })
}

 /**
 * 分包预算转总价审批打印
 * @param data
 */
     export function budegtPrint(data){
        return request({
          url: `${commercialApiUrl}/business-subcontracting-budget/print?id=${data.id}`,
          method: 'get',
          data
        })
      } 
      